Skip to content

[Tests] [Bugfix] Skip MoE tests for models which cannot be imported - #2890

Merged
kylesayrs merged 3 commits into
mainfrom
kylesayrs/skip-import-failure
Jul 7, 2026
Merged

[Tests] [Bugfix] Skip MoE tests for models which cannot be imported#2890
kylesayrs merged 3 commits into
mainfrom
kylesayrs/skip-import-failure

Conversation

@kylesayrs

@kylesayrs kylesayrs commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Purpose

  • Skip test_linearize_moe if model is not supported by local transformers version
  • Skip test_load_quantizable_moe if model is not supported by local transformers version
  • Reduce memory usage for deepseek_v4

Testing

  • Tested that all tests pass, with 3 skipped when transformers==5.9.0
tests/llmcompressor/modeling/test_linearize.py ..s..............s....s...........                                [100%]
====================================== 31 passed, 3 skipped, 14 warnings in 1.79s ======================================

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 16b24647-495d-4572-a7da-0a9e5327fc20

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kylesayrs/skip-import-failure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates tests/llmcompressor/modeling/test_linearize.py to skip test_linearize_moe instead of failing with an assertion when the model configuration or experts classes cannot be imported. The reviewer pointed out that the skip logic is missing for test_load_quantizable_moe, which was also supposed to be updated according to the PR description.

Comment thread tests/llmcompressor/modeling/test_linearize.py
@mergify

mergify Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The quality checks have failed. Please run make style and make quality under
the root directory to adddress the lint failures. You will need to install the
dev optional install to get the required linting packages:
https://github.com/vllm-project/llm-compressor/blob/main/CONTRIBUTING.md

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs
kylesayrs marked this pull request as ready for review July 6, 2026 18:23
Comment thread tests/llmcompressor/modeling/test_linearize.py
@kylesayrs kylesayrs added the ready When a PR is ready for full CI testing before merge label Jul 6, 2026
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@mergify mergify Bot removed the quality-failed label Jul 6, 2026
@mergify

mergify Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The quality checks have failed. Please run make style and make quality under
the root directory to adddress the lint failures. You will need to install the
dev optional install to get the required linting packages:
https://github.com/vllm-project/llm-compressor/blob/main/CONTRIBUTING.md

@mergify mergify Bot removed the quality-failed label Jul 6, 2026
@kylesayrs
kylesayrs enabled auto-merge (squash) July 6, 2026 22:34

@dsikka dsikka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t it be easier to skip just based on version?

@kylesayrs

Copy link
Copy Markdown
Collaborator Author

@dsikka I don't want to have to figure out which transformers version each of these model architectures were added

@kylesayrs

kylesayrs commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Tests are failing because need vllm-project/compressed-tensors#767 or vllm-project/compressed-tensors#768

@kylesayrs
kylesayrs merged commit d0a5351 into main Jul 7, 2026
23 of 37 checks passed
@kylesayrs
kylesayrs deleted the kylesayrs/skip-import-failure branch July 7, 2026 15:02
HDCharles pushed a commit that referenced this pull request Aug 10, 2026
…2890)

## Purpose ##
* Skip `test_linearize_moe` if model is not supported by local
transformers version
* Skip `test_load_quantizable_moe` if model is not supported by local
transformers version
* Reduce memory usage for `deepseek_v4`

## Testing ##
* Tested that all tests pass, with 3 skipped when `transformers==5.9.0`
```
tests/llmcompressor/modeling/test_linearize.py ..s..............s....s...........                                [100%]
====================================== 31 passed, 3 skipped, 14 warnings in 1.79s ======================================
```

---------

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready When a PR is ready for full CI testing before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants